package com.example.demo2;


import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("T1")
@RestController
public class Test1 {
    @RequestMapping("t1")
    public String t1(String name,Integer age){
        return "姓名："+name+"    年龄:"+age;
    }

    @RequestMapping("t2")
    public String t2(StudentInfo studentInfo){
        return studentInfo.toString();
    }

    @RequestMapping("t3")
    public String t3(@RequestParam List<Integer> list){
        return list.toString();
    }

    @RequestMapping("t4")
    public String t4(@RequestParam("q") List<Integer> list){
        return list.toString();
    }


    @RequestMapping("t5")
    public String t5(@RequestParam("e") List<Integer> list){
        return list.toString();
    }

    @RequestMapping("t6")
    public String t6(@RequestParam("t") List<List<Integer>>list){
        return list.toString();
    }

    @RequestMapping("t7")
    public String t7(@RequestBody StudentInfo studentInfo){
        return studentInfo.toString();
    }


    @RequestMapping("t8")
    public String t8(@RequestBody List<List<Integer>>list){
        return list.toString();
    }

    @RequestMapping("r9/{name}/{age}")
public String r9(@PathVariable String name,@PathVariable Integer age){
        return "姓名："+name+"   年龄："+age;
    }
}
